home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / SUNBELT.CMD < prev    next >
Encoding:
Text File  |  1996-03-01  |  1.8 KB  |  109 lines

  1. #    Login.cmd for Sunbelt.Net
  2. #
  3. #trace on
  4. #
  5. # set up some strings for dialling up
  6. #
  7. if ![load $number]
  8.   if [query $number "Enter the SunBelt.Net phone number"]
  9.     save $number
  10.   end
  11. end
  12. if ![load $modemsetup]
  13.   if [query $modemsetup "Enter your modem initialization string"]
  14.     save $modemsetup
  15.   end
  16. end
  17. if ![load $username]
  18.   if [username "Enter your login Username"]
  19.     save $username
  20.   end
  21. end
  22. if ![load $password]
  23.   if [password "Enter your login Password"]
  24.     save $password
  25.   end
  26. end
  27. # $modemsetup = "&c1&d2x0"
  28. $prompt = ">"
  29. $userprompt = "sername"
  30. $passprompt = "assword"
  31. $slipcmd = "slip"
  32. $pppcmd = "ppp"
  33.  
  34. %attempts = 10
  35. #
  36. #
  37. #----------------------------------------------------------
  38. #
  39. # initialize modem
  40. #
  41. output "atz"\13
  42. if ! [input 10 OK\n]
  43.   display "Modem is not responding"\n
  44.   abort
  45. end
  46. #
  47. # setup our modem commands
  48. #
  49. output "at"$modemsetup\13
  50. input 10 OK\n
  51. #
  52. # send phone number
  53. #
  54. %n = 0
  55. repeat
  56.   if %n = %attempts
  57.     display "Too many dial attempts"\n
  58.     abort
  59.   end
  60.   output "atdt"$number\13
  61.   %ok = [input 60 CONNECT]
  62.   %n = %n + 1
  63. until %ok
  64. input 10 \n
  65. #
  66. #  wait till it's safe to send because some modem's hang up
  67. #  if you transmit during the connection phase
  68. #
  69. wait 30 dcd
  70. #
  71. # now prod the terminal server
  72. #
  73. output \13
  74. #
  75. #  wait for the username prompt
  76. #
  77. input 30 $userprompt
  78. output $username\13
  79. #
  80. # and the password
  81. #
  82. input 30 $passprompt
  83. output $password\13
  84. #
  85. # we are now logged in
  86. #
  87. input 30 $prompt
  88. if %ppp
  89.   #
  90.   # jump into ppp mode
  91.   #
  92.   output $pppcmd\13
  93.   #
  94.   input 30 \n
  95.   #
  96.   display "PPP mode selected.  Will try to negotiate IP address."\n
  97.   #
  98. else
  99.   #
  100.   # jump into slip mode
  101.   #
  102.   output $slipcmd\13
  103.   #
  104.   bootp
  105. end
  106. #
  107. # now we are finished.
  108. #
  109.